#include "BlockSpeed.h"


BlockSpeed::BlockSpeed(void)
	:_way(0,0), _power(0)
{
}

BlockSpeed::BlockSpeed(Vector3l s, long p)
	:_way(s.Normalize()), _power(p)
{
}

BlockSpeed::BlockSpeed(Vector3l s)
	:_way(s.Normalize()), _power((long)s.Norm())
{
	// Construct
}

BlockSpeed::~BlockSpeed(void)
{
}

bool BlockSpeed::isMoved()
{
	return ( (_way.x!=0 || _way.y!=0) && _power!=0 );
}

void BlockSpeed::downSpeed()
{
	_power--;
	if( _power < 0 ) _power = 0;
}

